<?php
require_once("includes/prepend.php");
require_once("includes/lifesubnav.php");
$friends = $page->friends;
$test = $page->test;
?>
<div id="maincontent"><!--start maincontent-->
	<div id="friendviewcontent"><!--start friendviewcontent-->
		<div id="addNew"><a href="friendmanage.php"><img src="style/add.jpg" style="width:15px;height:15px;" />添加</a></div>
		<div id="friendlist"> 
			<li>类别</li><li>姓名</li><li>手机号码</li><li>QQ号</li><li>MSN号</li><li>邮箱</li><li>通讯地址</li><li>备注</li>
			<?php
			if ($friends[0][0]==""){
				echo "<li class='nonFriendMes' style='border:1px solid #CCCCCC;width:885px;'>您还未添加通讯录！</li>";
			}
			else {
				$i=1;
				foreach ($friends as $key=>$values){
					if ($i%2==0){
						$styleClass="style='background:#A7C569;'";
					}
					else{
						$styleClass="style='background:#FFFFCC;'";
					}
					$kind_id = $values["kind_id"];
					$kindName = $page->getKindName($kind_id);
					if ($kindName==""){
						$kindName = "无类别";
					}
					$tid = $values["id"];
					$name = $values["friendName"];
					$tel = $values["tel"];
					$qq = $values["qq"];
					$msn = $values["msn"];
					$email = $values["e_mail"];
					$address = $values["address"];
					$otherInfo = $values["otherInfo"];
					echo "<div tid='$tid' style='width:900px;margin:0 auto;' ondblclick ='controlBar(this)' >
					<li $styleClass class='thisSameli' title='$kindName'><a href='friendlist.php?kind=$kindName'>$kindName</a></li>
					<li $styleClass class='thisSameli' title='$name'>$name</li>
					<li $styleClass class='thisSameli' title='$tel'>$tel</li>
					<li $styleClass class='thisSameli' title='$qq'>$qq</li>
					<li $styleClass class='thisSameli' title='$msn'>$msn</li>
					<li $styleClass class='thisSameli' title='$email'>$email</li>
					<li $styleClass class='thisSameli' title='$address'>$address</li>
					<li $styleClass class='thisSameli' title='$otherInfo'>$otherInfo</li>
					</div>";
					$i++;
					
				}
			}
			
			?>
		</div>
	</div><!--end friendviewcontent-->
</div><!--end maincontent-->

<?php require_once("includes/pagefoot.php");
